function addtext(id,data)
	{
		document.getElementById(id).innerHTML=data;
	}
function creatmembertable(data,tb)
{
	for(var i =0;i<data.length;i++)
	{ 
   var idtd = document.createElement("td");
   var nametd = document.createElement("td");
   var classtd = document.createElement("td");
   var sextd = document.createElement("td");
   var phonetd = document.createElement("td");

   nametd.innerHTML=data[i].stu_name;
   sextd.innerHTML=data[i].stu_sex;
   classtd.innerHTML=data[i].stu_class;
   phonetd.innerHTML=data[i].stu_phone;
   idtd.innerHTML=data[i].stu_id;
   var tr = document.createElement("tr");
   tr.appendChild(idtd)
   tr.appendChild(nametd)
   tr.appendChild(classtd)
   tr.appendChild(sextd)
   tr.appendChild(phonetd)
   tb.appendChild(tr)
	}
}
function creatpctable(data,tb)
{
	for(var i =0;i<data.length;i++)
	{ 
   var idtd = document.createElement("td");
   var ostd = document.createElement("td");
   var locationtd = document.createElement("td");
   var Iptd = document.createElement("td");
   idtd.innerHTML=data[i].id;
   ostd.innerHTML=data[i].pc_os;
   locationtd.innerHTML=data[i].pc_location;
   Iptd.innerHTML=data[i].pc_ip;
   var tr = document.createElement("tr");
   tr.appendChild(idtd)
   tr.appendChild(ostd)
   tr.appendChild(locationtd)
   tr.appendChild(Iptd)
   tb.appendChild(tr)
	}
}
function creatacttable(data,tb)
{
	for(var i =0;i<data.length;i++)
	{ 
   var acttd = document.createElement("td");
   var actinfotd = document.createElement("td");
   var acttime = document.createElement("td");
   acttd.innerHTML=data[i].Action_type;
   actinfotd.innerHTML=data[i].ActionContext;
   acttime.innerHTML=data[i].Actiontime;
   var tr = document.createElement("tr");
   tr.appendChild(acttd)
   tr.appendChild(actinfotd)
   tr.appendChild(acttime)
    tb.appendChild(tr)
	}
}
function creatusingtable(data,tb)
{
	for(var i =data.length-1;i>=0;i--)
	{ 
   var begintd = document.createElement("td");
   var overtd = document.createElement("td");
   var name = document.createElement("td");
   begintd.innerHTML=data[i].Begin;
   overtd.innerHTML=data[i].Over;
   name.innerHTML=data[i].name;
   var tr = document.createElement("tr");
   tr.appendChild(begintd)
   tr.appendChild(overtd)
   tr.appendChild(name)
    tb.appendChild(tr)
	}
}
function creatpcmanagetable(data, tb)
{
	for(var i =0;i<data.length;i++)
	{ 
   var idtd = document.createElement("td");
   var ostd = document.createElement("td");
   var locationtd = document.createElement("td");
   var Iptd = document.createElement("td");
   var libtd = document.createElement("td");
   var ctrtd = document.createElement("td");
   var usingtd = document.createElement("td");
   idtd.innerHTML=data[i].id;
   ostd.innerHTML=data[i].pc_os;
   locationtd.innerHTML=data[i].pc_location;
   Iptd.innerHTML=data[i].pc_ip;
   libtd.innerHTML=data[i].pc_libname;
   usingtd.innerHTML=data[i].pc_usingmember;
   var bt1 = document.createElement("a");
   var bt2 = document.createElement("a");
   bt1.innerHTML="->delete";
   bt2.innerHTML="->modify";
   bt1.setAttribute("onclick","deletel('"+data[i].id+"')");
   bt1.setAttribute("class","btn-xs");
   bt2.setAttribute("onclick","modify('"+data[i].id+"')");
   bt2.setAttribute("class","btn-xs");
   ctrtd.appendChild(bt1);
   ctrtd.appendChild(bt2);
   var tr = document.createElement("tr");
    tr.setAttribute("id",data[i].id);
   tr.appendChild(idtd)
   tr.appendChild(ostd)
   tr.appendChild(Iptd)
   tr.appendChild(locationtd)
   tr.appendChild(libtd)
   tr.appendChild(ctrtd)
   tr.appendChild(usingtd)
   tb.appendChild(tr)
	}
}


